﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Golem.Indexer.Data;

namespace Golem.Indexer.Indexers
{
    public delegate void IndexerFileHandler(MachineDescriptor machine, Protocol protocol, List<FileDescriptor> files);
    public delegate void IndexerProtocolHandler(MachineDescriptor machine, Protocol protocol);
    public delegate void IndexerHandler();
    public delegate void IndexerErrorHandler(MachineDescriptor machine, Protocol protocol, Exception ex);

    public interface IIndexer
    {
        event IndexerFileHandler FilesIndexed;
        event IndexerProtocolHandler ProtocolIndexingStarted;
        event IndexerProtocolHandler ProtocolIndexingEnded;
        event IndexerErrorHandler ProtocolIndexingErrorThrowed;
        int RemainingMachinesCount { get; }
        bool IndexHidden { get; set; }
        void Add(params MachineDescriptor[] machines);
        void Clear();
        void RunIndexing();
        void StopIndexing();
    }
}
